/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package zombieville.GUI;

import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JPanel;
import zombieville.engine.Cenario;
import zombieville.engine.Item;

/**
 *
 * @author -Gui-
 */
public class CenarioGUI extends JPanel {

    private Cenario cenario;

    public CenarioGUI(Cenario cenario) {

        this.cenario = cenario;
        setFocusable(true);

    }

    @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);

        Graphics2D g2 = (Graphics2D) g;

        for (Item i : cenario.getItens()) {

            i.getItemGui().desenha(g2);
        }

    }
}
